package com.z6school.manage.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.z6school.manage.common.pojo.DeptMajorClass;
import com.z6school.manage.common.pojo.Nodes;
import com.z6school.manage.po.Clas;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ClassMapper extends BaseMapper<Clas> {

    /*****************************************/
    @Select("select*from clazz")
    List<DeptMajorClass> findAll();

    @Delete("delete from clazz where id=#{id}")
    int deleteByClassId(Integer id);

    @Select("select name from clazz where id=#{classId}")
    String getClassNameById(Integer classId);
    //@Select("select id,name,parentId from clazz")
    //List<Nodes> findZTreeNodes();  班级为最小单位 没有必要加上
}
